﻿@using BootstrapBlazor.Shared.Samples;
@inject IStringLocalizer<Selects> Localizer

<ValidateForm Model="BindModel">
    <div class="row g-3">
        <div class="col-12 col-sm-6">
            <Select @bind-Value="BindModel.Name">
                <Options>
                    <SelectOption Text="@Localizer["SelectsOption1"]" Value="" />
                    <SelectOption Text="@Localizer["SelectsOption2"]" Value="1" />
                    <SelectOption Text="@Localizer["SelectsOption3"]" Value="2" />
                    <SelectOption Text="@Localizer["SelectsOption4"]" Value="3" />
                </Options>
            </Select>
        </div>
        <div class="col-12 col-sm-6 align-self-end">
            <Button ButtonType="ButtonType.Submit">@Localizer["SelectsClientValidationButtonText2"]</Button>
        </div>
    </div>
</ValidateForm>

@code {
    private Foo BindModel { get; set; } = new Foo() { Name = "" };
}
